#ifndef QBASEDEFINE_H
#define QBASEDEFINE_H

#include <QString>
#include <QMap>
#include <QStringList>

#define SERVER_HAND_READ    10000
#define SERVER_HAND_WRITE   10001
#define CLIENT_HAND_READ    SERVER_HAND_WRITE
#define CLIENT_HAND_WRITE   SERVER_HAND_READ

#define SERVER_READ         10002
#define SERVER_WRITE        10003
#define CLIENT_WRITE        SERVER_READ
#define CLIENT_READ         SERVER_WRITE

#define NEW_DEVICE_CODE     500
#define NEW_SERVER_CODE     501
#define DEVICE_HAND_CODE    502
#define SERVER_HAND_CODE    503
#define SERVER_OFFLINE_CODE 504
#define DEVICE_OFFLINE_CODE 505
#define PROPERTY_CODE       506

#define SERVER_TITLE        "Server"
#define CLIENT_TITLE        "Client"

#define HAND_TIME_OUT       4000

#define UPDATE_CONTROL_CODE     0x1000
#define DATA_SYCN_CODE          0X1001
#define DRIVER_LISTERN_CODE     0X1002
#define DATABASE_LOAD_CODE      0X1003

class QProjectCore;

struct tagDeviceInfo
{
    QString     m_uuid;
    QString     m_project_name;
    QString     m_device_type;
    uint        m_device_ip;
    QString     m_soft_version;
    QString     m_soft_status;
    QStringList m_propertys;
    QProjectCore    *m_project_core;
};

struct tagServerInfo
{
    QString     m_uuid;
    QString     m_server_type;
    QString     m_server_version;
    uint        m_server_ip;
};

#endif // QBASEDEFINE_H
